package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.UnDownPersonAuthEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @author: wukangrong
 * @date: 2020/12/22 17:08
 * @description:
 */
@Component
@Mapper
public interface PersonMapper extends BaseMapper<UnDownPersonAuthEntity> {

    @Select("select person_id, status from person where status = false order by person_id limit 2")
    List<UnDownPersonAuthEntity> selectTwo();

    @Select("select count(person_id) from person where status = false")
    int count();
}
